package cn.bytemecc.bloomFilter.bitmap;

import java.util.BitSet;

/**
 * @description: TODO
 * @author: Liang Zi cao
 * @DATE: 2023/7/16
 * Talk is cheap. Show me the code
 **/
public class DefaultBitmap  {
    protected Integer size;
    protected BitSet bitmap ;

    public DefaultBitmap(Integer size) {
        this.size = size;
        this.bitmap = new BitSet(size);
    }

    public void setBit(Integer index){
        bitmap.set(index,true);
    }

    public boolean getBit(Integer index){
        return bitmap.get(index);
    }

    public Integer getSize() {
        return size;
    }
}
